namespace MongooseModel {
    export interface IMoActivity {
        activityid?: number;
        createdAt?: string;
        updatedAt?: string;
        title?: string;
        content?: string;
    }

    export interface IMoActivityuser {
        activityid?: number;
        createdAt?: string;
        updatedAt?: string;
        title?: string;
        content?: string;
        userid?: number;
        username?: string;
    }

    export interface IMoChat {
        userId?: number;
        modelId?: string;
        createdAt?: string;
        updatedAt?: string;
        title?: string;
        messages?: IMoMessage[];
        uuid?: string;
        questionid?: number;
    }

    export interface IMoMessage {
        role?: 'user' | 'assistant' | 'system';
        type?: string;
        imageUrl?: string[];
        content?: string;
        usercontent?: string;
        timestamp?: number;
        knowledgeReferences?: IMoKnowledge[];
        links?: IMoLink[];
        isProcessed?: boolean;
        isLike?: boolean;
        isDislike?: boolean;
        disLikeMessage?: string;
        reasoning?: string;
        usage?: IMoUsage;
        reasoningDetails?: IMoReasoningDetails[];
        sources?: IMoSources[];
    }

    export interface IMoUsage {
        promptTokens?: number;
        completionTokens?: number;
        totalTokens?: number;
    }

    export interface IMoReasoningDetails {
        type?: string;
        text?: string;
        signature?: string;
    }

    export interface IMoSources {
        sourceType?: 'url';
        id?: string;
        url?: string;
        title?: string;
        providerMetadata?: Record<string, any>;
    }

    export interface IMoKnowledge {
        title?: string;
        content?: string;
        documentId?: string;
    }

    export interface IMoLink {
        title?: string;
        url?: string;
        description?: string;
    }

    export interface IMoCheck {
        state?: '未开始' | '进行中' | '完成' | '失败';
        modelsId?: number[];
        modelName?: string;
        createdAt?: number;
        updatedAt?: string;
        message?: string;
        result?: string;
        system?: string;
        content?: string;
        usercontent?: string;
        userid?: number;
        startTime?: string;
        endTime?: string;
        type?: string;
        images?: string[];
        temperature?: number;
        questionid?: number;
        schema1?: Record<string, any>;
        total_tokens?: Record<string, any>;
    }

    export interface IMoUserWeeklySummary {
        createdAt?: number;
        updatedAt?: number;
        title?: string;
        content?: string;
        userid?: number;
        username?: string;
        year?: number;
        week?: number;
    }
}

export default MongooseModel;